const Koa =require('koa');
const router=require('koa-router');
const app = new Koa();

app.use(async (ctx,next) => {
  ctx.body = 'Hello World';
  await next()
});

router.get('/user',async(ctx,next)=>{
  var name = ctx.params.name;
  ctx.response.body = `<h1>Hello, ${name}!</h1>`;
  await next()
})


app.use(router.routes());
app.listen(3000);
